home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3dm / midi / mdSend.z / mdSend
Encoding:
Text File  |  1998-10-20  |  4.7 KB  |  133 lines

  1.  
  2.  
  3.  
  4. mmmmddddSSSSeeeennnndddd((((3333ddddmmmm))))                                                        mmmmddddSSSSeeeennnndddd((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      mdSend - send out MIDI data
  10.  
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////mmmmiiiiddddiiii....hhhh>>>>
  14.  
  15.      iiiinnnntttt mmmmddddSSSSeeeennnndddd((((MMMMDDDDppppoooorrrrtttt ppppoooorrrrtttt,,,, MMMMDDDDeeeevvvveeeennnntttt ****bbbbuuuuffff,,,, iiiinnnntttt ccccoooouuuunnnntttt))))
  16.  
  17.  
  18. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.      mmmmddddSSSSeeeennnndddd writes MIDI events to the interface indicated by _p_o_r_t.  _b_u_f points
  20.      to a user-allocated array containing at least _c_o_u_n_t MDevent structures.
  21.      mdSend will always transmit _c_o_u_n_t events; it will block if necessary
  22.      waiting for the interface event queue to drain.
  23.  
  24.      The event structure contains the MIDI message to be transmitted in the
  25.      _m_s_g field (see mmmmddddIIIInnnnttttrrrroooo((((3333ddddmmmm)))) for details on the MDevent structure).  If
  26.      the application wishes to transmit a system exclusive message, it should
  27.      set msg[0] to MD_SYSEX (0xF0), point _s_y_s_e_x_m_s_g to the block of sysex data,
  28.      and set _m_s_g_l_e_n to the length of the sysex data.  It is possible for a
  29.      system exclusive message to be transmitted in multiple segments, but the
  30.      first byte in the first sysexmsg chunk must contain MD_SYSEX, and the
  31.      last byte in the last sysexmsg chunk must be MD_EOX.
  32.  
  33.      The current implementation of the library cannot properly merge multiple
  34.      streams of system exclusive data transmitted to the same interface. For
  35.      best results no more than one port should transmit system exclusive data
  36.      to an interface at any given time.
  37.  
  38.      The stamp field of the event governs when that event will be transmitted.
  39.      Event stamps must be greater than or equal to 0. The interpretation of a
  40.      stamp depends on the stamping mode of the port (see mmmmddddSSSSeeeettttSSSSttttaaaammmmppppMMMMooooddddeeee((((3333ddddmmmm))))).
  41.      If the port's stamp mode is MD_NOSTAMP, the event will be transmitted
  42.      immediately.  If the stamp mode is MD_RELATIVESTAMP or MD_DELTASTAMP, the
  43.      stamp value is in milliseconds. In MD_RELATIVETICKS or MD_DELTATICKS
  44.      mode, the stamp value is in ticks.  When in one of the relative stamp
  45.      modes, the time stamps of the events must increase monotonically.  In
  46.      these modes (MD_RELATIVETICKS and MD_RELATIVESTAMP), if an application
  47.      sends an event whose timestamp is less than that of its predecessor, the
  48.      event will be transmitted immediately.
  49.  
  50.      If the MIDI interface's event queue is full when mdSend is called, mdSend
  51.      will block until space if available.  To avoid blocking, and application
  52.      can call sssseeeelllleeeecccctttt((((3333)))) (see mmmmddddGGGGeeeettttFFFFdddd).
  53.  
  54.  
  55. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  56.      mdSend returns the number of messages actually sent on success or -1
  57.      times the number of messages sent on error.  Note that a return value of
  58.      0 indicates that an error occurred and that no messages were sent.  The
  59.      following error codes are possible:
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. mmmmddddSSSSeeeennnndddd((((3333ddddmmmm))))                                                        mmmmddddSSSSeeeennnndddd((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74.      ENXIO    - A bad MDport was passed to mdSend
  75.  
  76.      EFAULT   - An invalid address was passed to the MIDI driver
  77.  
  78.      EINVAL   - An undefined operation was called.
  79.  
  80. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  81.      mmmmddddIIIInnnnttttrrrroooo((((3333ddddmmmm)))), mmmmddddSSSSeeeettttSSSSttttaaaammmmppppMMMMooooddddeeee((((3333ddddmmmm)))), mmmmddddGGGGeeeettttFFFFdddd, sssseeeelllleeeecccctttt((((2222))))
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.